package com.heima.wemedia.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmAiCategory;
import com.heima.wemedia.mapper.WmAiCategoryMapper;
import com.heima.wemedia.service.WmAiCategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WmAiCategoryServiceImpl extends ServiceImpl<WmAiCategoryMapper, WmAiCategory> implements WmAiCategoryService {
    @Override
    public ResponseResult listAll() {
        List<WmAiCategory> list = list(new LambdaQueryWrapper<WmAiCategory>().orderByAsc(WmAiCategory::getOrd));
        return ResponseResult.okResult(list);
    }
}
